package com.ashin.snowflake;

import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.net.NetUtil;
import cn.hutool.core.util.IdUtil;

/**
 * @Author: Ashin
 * @Date: 2021/2/22
 * @Description: com.ashin.snowflake
 * @Version: 1.0.0
 */
public class Main {

    public static void main(String[] args) {
        System.out.println(NetUtil.getLocalhostStr());
        long workId = NetUtil.ipv4ToLong(NetUtil.getLocalhostStr());
        System.out.println(workId);
        Snowflake snowflake = IdUtil.createSnowflake(0,1);
        System.out.println(snowflake.nextId());
    }

}
